// JavaScript Document
/*图表一*/	
function char1(){	
var myChart11 = echarts.init(document.getElementById('main11'),theme1); 
  option = {
    tooltip : {
        trigger: 'axis'
    },
    calculable : true,
    xAxis : [
        {
            type : 'category',
            boundaryGap : false,
            data : ['周一','周二','周三','周四','周五','周六','周日']
        }
    ],
    yAxis : [
        {
            type : 'value'
        }
    ],
    series : [
        {
            name:'成交',
            type:'line',
            smooth:true,
            itemStyle: {normal: {areaStyle: {type: 'default'}}},
            data:[10, 12, 21, 54, 260, 830, 710]
        }
    ]
};
 myChart11.setOption(option);
}
/*图表二*/
function char2(){	
var myChart12 = echarts.init(document.getElementById('main12'),theme1); 
  option = {
    tooltip : {
        trigger: 'axis'
    },
    calculable : true,
    xAxis : [
        {
            type : 'category',
            boundaryGap : false,
            data : ['周一','周二','周三','周四','周五','周六','周日']
        }
    ],
    yAxis : [
        {
            type : 'value'
        }
    ],
    series : [
        {
            name:'成交',
            type:'line',
            smooth:true,
            itemStyle: {normal: {areaStyle: {type: 'default'}}},
            data:[10, 12, 21, 54, 260, 600, 710]
        }
    ]
};
 myChart12.setOption(option);
}
/*图表三*/
function char3() {
    var myChart13 = echarts.init(document.getElementById('main13'), theme1);
    option = {
        tooltip: {
            trigger: 'axis'
        },
        calculable: true,
        xAxis: [
            {
                type: 'category',
                boundaryGap: false,
                data: ['周一', '周二', '周三', '周四', '周五', '周六', '周日']
            }
        ],
        yAxis: [
            {
                type: 'value'
            }
        ],
        series: [
            {
                name: '成交',
                type: 'line',
                smooth: true,
                itemStyle: { normal: { areaStyle: { type: 'default' } } },
                data: [10, 12, 21, 54, 260, 830, 710]
            }
        ]
    };
    myChart13.setOption(option);
}
/*图表四*/
function char4() {
    var myChart14 = echarts.init(document.getElementById('main14'), theme1);
    option = {
        tooltip: {
            trigger: 'axis'
        },
        calculable: true,
        xAxis: [
            {
                type: 'category',
                boundaryGap: false,
                data: ['周一', '周二', '周三', '周四', '周五', '周六', '周日']
            }
        ],
        yAxis: [
            {
                type: 'value'
            }
        ],
        series: [
            {
                name: '成交',
                type: 'line',
                smooth: true,
                itemStyle: { normal: { areaStyle: { type: 'default' } } },
                data: [10, 12, 21, 54, 260, 600, 710]
            }
        ]
    };
    myChart14.setOption(option);
}

/*漏斗*/
var myChart2 = echarts.init(document.getElementById('main2'),theme3); 
option = {
    tooltip : {
        trigger: 'item',
        formatter: "{a} <br/>{b} : {c}%"
    },
    calculable : true,
    series : [
        {
            name:'漏斗图',
            type:'funnel',
            width: '90%',
			itemStyle: {
                normal: {
                    // color: 各异,
                    label: {
                        position: 'left'
                    }
                }
            },
            data:[
                {value:80, name:'推荐客户'},
                {value:60, name:'有效客户'},
                {value:40, name:'到访量'},
                {value:20, name:'成交量'}
            ]
        }
    ]
};
myChart2.setOption(option);

/*混合*/
var myChart31 = echarts.init(document.getElementById('main31'),theme2); 
option = {
    tooltip : {
        trigger: 'axis'
    },
    calculable : true,
    legend: {
        data:['预定量','成交量']
    },
    xAxis : [
        {
            type : 'category',
            data : ['1月','2月','3月','4月','5月','6月','7月','8月','9月','10月','11月','12月']
        }
    ],
    yAxis : [
        {
            type : 'value',
            name : '预定量',
            axisLabel : {
                formatter: '{value} '
            }
        },
        {
            type : 'value',
            name : '成交量',
            axisLabel : {
                formatter: '{value} '
            }
        }
    ],
    series : [

        {
            name:'预定量',
            type:'bar',
            data:[2.0, 4.9, 7.0, 23.2, 25.6, 76.7, 135.6, 162.2, 32.6, 20.0, 6.4, 3.3]
        },
        {
            name:'成交量',
            type:'line',
            yAxisIndex: 1,
            data:[2.0, 2.2, 3.3, 4.5, 6.3, 10.2, 20.3, 23.4, 23.0, 16.5, 12.0, 6.2]
        }
    ]
};
 myChart31.setOption(option);                   

/*柱状*/
var myChart32 = echarts.init(document.getElementById('main32'),theme2); 
option = {
    tooltip : {
        trigger: 'axis'
    },
    legend: {
        data:['预定量','成交量']
    },
    calculable : true,
    xAxis : [
        {
            type : 'category',
            data : ['1月','2月','3月','4月','5月','6月','7月','8月','9月','10月','11月','12月']
        }
    ],
    yAxis : [
        {
            type : 'value'
        }
    ],
    series : [
        {
            name:'预定量',
            type:'bar',
            data:[2.0, 4.9, 7.0, 23.2, 25.6, 76.7, 135.6, 162.2, 32.6, 20.0, 6.4, 3.3]
        },
        {
            name:'成交量',
            type:'bar',
            data:[2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3]
        }
    ]
};
myChart32.setOption(option);

